package com.code.schedule;

import com.code.service.UserService;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * 同步相关的币种的充值记录的定时任务
 *
 * @author tangyifei
 * @since 2020年1月15日16:33:22
 */
@Component
public class SynRechargeTranSchedule {

    @Resource
    private UserService userService;

    /**
     * 每间隔3分钟同步相关的币种的充值记录
     */
    @Scheduled(cron = "0 0/3 * * * ?")
    @Async
    public void synRechargeTran() throws Exception{
        userService.synRechargeTran();
    }
}
